package com.carlinfo.stu_ques.demo.pojo;

import java.io.Serializable;
import java.util.Date;

/**
 * 皇帝 的pojo 属性:id,朝代id,名字,年龄,身高,庙号,年号,创建时间,更新时间, 方法:无参的构造函数,读写器,toString
 */
public class King implements Serializable
{
	private int id;
	private int dynastyId;
	private String name;
	private short age;
	private double height;
	private String miaohao;
	private String nianhao;
	private Date createTime;
	private Date updateTime;

	private Dynasty dynasty;

	public int getId()
	{
		return id;
	}

	public void setId(int id)
	{
		this.id = id;
	}

	public int getDynastyId()
	{
		return dynastyId;
	}

	public void setDynastyId(int dynastyId)
	{
		this.dynastyId = dynastyId;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public short getAge()
	{
		return age;
	}

	public void setAge(short age)
	{
		this.age = age;
	}

	public double getHeight()
	{
		return height;
	}

	public void setHeight(double height)
	{
		this.height = height;
	}

	public String getMiaohao()
	{
		return miaohao;
	}

	public void setMiaohao(String miaohao)
	{
		this.miaohao = miaohao;
	}

	public String getNianhao()
	{
		return nianhao;
	}

	public void setNianhao(String nianhao)
	{
		this.nianhao = nianhao;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public Date getUpdateTime()
	{
		return updateTime;
	}

	public void setUpdateTime(Date updateTime)
	{
		this.updateTime = updateTime;
	}

	public Dynasty getDynasty()
	{
		return dynasty;
	}

	public void setDynasty(Dynasty dynasty)
	{
		this.dynasty = dynasty;
	}

	@Override
	public String toString()
	{
		String result = getId() + "\t" + getDynastyId() + "\t" + getName() + "\t" + getAge() + "\t" + getHeight() + "\t"
				+ getMiaohao() + "\t" + getNianhao() + "\t" + getCreateTime().toLocaleString() + "\t" + getUpdateTime().toLocaleString();
		/*return "King [id=" + id + ", dynastyId=" + dynastyId + ", name=" + name + ", age=" + age + ", height=" + height
				+ ", miaohao=" + miaohao + ", nianhao=" + nianhao + ", createTime=" + createTime + ", updateTime="
				+ updateTime + "]";*/
		return result ;
	}

}
